<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
	<link rel="stylesheet" href="../../static/css/bootstrap.min.css">
	<link rel="stylesheet" href="../../static/css/ylb.css">
	<link rel="shortcut icon" href="../../static/img/logo.png">
	<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
	<script type="text/javascript" src="../../static/js/popper.min.js"></script>
	<script type="text/javascript" src="../../static/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="./banOpenid.js"></script>
</head>
<body>

<div id="app">
	
	<!-- 左侧 -->
	<div class="left">
		<div class="dhview">

			<!-- LOGO -->
			<a href="../index/" class="index">
			    <div class="logo"></div>
			</a>

			<!-- 导航 -->
			<ul>
			    <a href="../index/" >
			    <li class="nav-li">
			        <i class="icon i-data"></i>
			        <span class="nav-text">数据</span>
			    </li>
			    </a>
			    
			    <a href="../qun/">
			    <li class="nav-li">
			        <i class="icon i-hm"></i>
			        <span class="nav-text">活码</span>
			    </li>
			    </a>
			    
				<a href="../dwz/">
				<li class="nav-li">
				    <i class="icon i-dwz"></i>
				    <span class="nav-text">短网址</span>
				</li>
				</a>
				
				<a href="../tbk/">
				<li class="nav-li">
				    <i class="icon i-tbk"></i>
				    <span class="nav-text">淘宝客</span>
				</li>
				</a>
				
				<a href="../shareCard/">
				<li class="nav-li">
				    <i class="icon i-share"></i>
				    <span class="nav-text">分享卡片</span>
				</li>
				</a>
				
				<a href="../plugin/">
				<li class="nav-li">
				    <i class="icon i-plugin"></i>
				    <span class="nav-text">插件中心</span>
				</li>
				</a>
				
				<a href="../kami/" class="selected">
				<li class="nav-li">
				    <i class="icon i-kami-dark"></i>
				    <span class="nav-text">卡密分发</span>
				</li>
				</a>
				
				<a href="../config/">
				<li class="nav-li">
				    <i class="icon i-config"></i>
				    <span class="nav-text">配置中心</span>
				</li>
				</a>
				
				<a href="../sucai/">
				<li class="nav-li">
				    <i class="icon i-sucai"></i>
				    <span class="nav-text">素材管理</span>
				</li>
				</a>
				
				<a href="../user/">
				<li class="nav-li">
				    <i class="icon i-account"></i>
				    <span class="nav-text">账号管理</span>
			    </li>
			    </a>
			</ul>

			<!-- 账号 -->
			<div class="account">加载中...</div>
		    
		</div>
	</div>

	<!-- 右侧 -->
	<div id="right">
	    
		<h3>卡密分发 ➜ <span class="mbx">封禁名单</span></h3>
		<div class="data-card">
		    
			<!-- 按钮区域 -->
			<div class="button-view" id="button-view" style="display:none;">
			    
			    <!--flex布局按钮容器-->
    			<div class="flex-button-view">
    			    
    			    <!--导航-->
    			    <div class="button-daohang">
    			        <a href="./"><button class="tint-btn">卡密项目</button></a>
    			        <a href="extractRecords.html"><button class="tint-btn" style="margin-left:5px;">提取记录</button></a>
    			        <a href="banOpenid.html"><button class="default-btn" style="margin-left:5px;">封禁名单</button></a>
    			    </div>
    			    
    			    <!--功能-->
    			    <div class="button-gongneng">
    			        <button class="tint-btn" 
        				data-toggle="modal" 
        				data-target="#unbanOpenidAllModal" style="margin-left:5px;">全部解封</button>
    			    </div>
    			</div>
			</div>

			<!-- 列表区域 -->
			<div class="data-list">
				<table class="table">
				    <thead></thead>
				    <tbody></tbody>
				</table>
			</div>
			
			<p class="loading" style="display: none;"></p>
			
			<!-- 分页 -->
			<div class="fenye"></div>
			
		</div><!-- data-card -->
	</div><!-- right -->
	
	<!-- 全部解封 -->
    <div class="modal fade" id="unbanOpenidAllModal">
        
        <div class="modal-dialog">
            <div class="modal-content">
                
                <!-- 头部 -->
                <div class="modal-header">
                    <h4 class="modal-title">解封Openid</h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                
                <!-- 内容 -->
                <div class="modal-body">
                    确定将所有封禁的openid全部解封？
                </div>
                
                <!-- 底部操作 -->
                <div class="modal-footer">
                    <button type="button" class="default-btn center-btn" onclick="unbanOpenidAll();">确定解封</button>
                </div>
                
                <!-- 操作反馈 -->
                <div class="result"></div>
                
            </div><!-- modal-content -->
        </div><!-- modal-dialog -->
    </div><!-- delExtractRecordsModal -->
    
    <!-- 全局信息提示框 -->
    <div id="notification">
        <div id="notification-text"></div>
    </div>

</div><!-- app -->

<script>
    
    // 上传客服二维码
    $("#selectKfQrcode").change(function(e){
        
        var fileSelect = e.target.files;
        if(fileSelect.length>0){
            var imageData = new FormData(document.getElementById("xcxConfig"));
            $.ajax({
                url:"../upload.php",
                type: "POST",
                data: imageData,
                cache: false,
                processData: false,
                contentType: false,
                success: function(res) {
                    
                    if(res.code == 200){
                        
                        // 将图片地址填写到表单
                        $('#xcxConfigModal input[name="kmConf_kfQrcode"]').val(res.url);
                        $('#xcxConfigModal .uploadText').text(res.msg);
                    }else{
                        
                        // 上传失败
                        $('#xcxConfigModal .uploadText').text(res.msg);
                    }
                },
                error: function() {
                    alert('服务器发生错误！');
                },
                beforeSend: function(){
                    $('#xcxConfigModal .uploadText').text('上传中...');
                }
            })
        }
    })

</script>
</body>
</html>